class MsgRecordModel {
  ///消息id
  int id;

  ///车辆id 这个字段暂时没用上，但是有这个字段
  // String? car_id;

  ///车辆编号
  String? car_no;

  ///运单id
  int? waybill_id;

  ///运单编号
  String? waybill_no;

  ///任务id
  int? waybill_mission_id;

  ///任务编号
  String? waybill_mission_no;

  ///消息类别  1=车辆消息 2=运单消息 3=任务消息;
  int type;

  ///0=新运单 1=运单已取消 2=新任务 3=到站消息(装货站点) 4=到站消息(卸货货站点) 5=预警消息
  int name_type;

  ///cp_id 显示上用不到
  int cp_id;

  ///driver_id  显示上用不到
  int driver_id;

  ///前端显示的时间格式
  String created_time;

  MsgRecordModel(
    this.id,
    // this.car_id,
    this.car_no,
    this.waybill_id,
    this.waybill_no,
    this.waybill_mission_id,
    this.waybill_mission_no,
    this.type,
    this.name_type,
    this.cp_id,
    this.driver_id,
    this.created_time,
  );

  factory MsgRecordModel.fromMap(Map<dynamic, dynamic> json) => MsgRecordModel(
        json['id'],
        // json['car_id'],
        json['car_no'],
        json['waybill_id'],
        json['waybill_no'],
        json['waybill_mission_id'],
        json['waybill_mission_no'],
        json['type'],
        json['name_type'],
        json['cp_id'],
        json['driver_id'],
        json['created_time'],
      );
}
